Copyright: Derechos Reservados PC Mayorista S.A. de C.V.
Citation: 'Informes y Ventas PC Mayorista Internet: ecova@vianet.com.mx


CODIGO PEGADO EN MEMORIA
El codigo ya ha sido agregado a la memoria

inicie Visual Basic 3.0 Profesional, vaya a

la Sección [Declarations] y presione (Shift+Insert)

El Codigo se agregará al proyecto

rapida y automaticamente...


Contents
DataBaseWizard...

DataBase Wizard... ha sido creado para aquellos programadores en Visual Basic Versión 3.0 Profesional que necesitan más velocidad y soluciones más practicas en la creación de sus programas en  lo referente a las bases de datos.

Con DataBase Wizard... solo necesita abrir una Base de Datos en los formatos reconocidos por Visual Basic Versión 3.0 Profesional y automaticamente el codigo para volver a crear la base de datos se posicionará en la memoria, solo tendrá que pegar el contenido de esta en el menú [Declarations] para que este Sub-Procedimiento tome su respectivo lugar dentro del proyecto, acto seguido solo lláme el proceso con el nombre del archivo que desea crear como base de datos por ejemplo:

Sub Command1_Click ()

CreaMiBaseDeDatos "C:\EUREKA.MDB"

End Sub

Y eso es todo, la base de datos se creara rapida y automaticamente...

He aqui algunos ejemplos de Codigo Generado por DataBase Wizard...

Ejemplo 1     Ejemplo 2     Ejemplo 3     Ejemplo 4     Ejemplo 5     Ejemplo 6

Recuerde, solo necesita abrir una base de datos para que todo el codigo se genere rapidamente, asi de facil, pruebe con los ejemplos que le proporcionamos y no tarde más en pedir su DataBase Wizard...

Informes y Ventas:

Internet e-mail

 ecova@vianet.com.mx


Ejemplo 1
'Ejemplo 1 Copie el codigo siguiente y peguelo en la seccion [Declarations] de Visual Basic...

Sub CreaMiBaseDeDatos (A$)'                  Regresar al Menú Principal (Return To Main Menu)

On Error Resume Next

'********************************************************************************

Dim MiBaseDeDatos As Database 'Declaración de la Base De Datos

Set MiBaseDeDatos = CreateDatabase(A$,";LANGID=0x0809;CP=1252;COUNTRY=0", 2)

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_001 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_001.Name = "Authors"

'Declaración de Nuevos Campos.

Dim Field_001 as New Field

Dim Field_002 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_001 as New Index

'Caracteristicas de los Campos.

Field_001.Name = "Au_ID"

Field_001.Type = 4

Field_001.Attributes = 17

NewTd_001.Fields.Append Field_001

Field_002.Name = "Author"

Field_002.Type = 10

Field_002.Size = 255

Field_002.Attributes = 2

NewTd_001.Fields.Append Field_002

'Caracteristicas de los Index.

NewIdx_001.Name = "PrimaryKey"

NewIdx_001.Fields = "+Au_ID"

NewIdx_001.Unique = -1

NewIdx_001.Primary = -1

NewTd_001.Indexes.Append NewIdx_001

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_001

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_002 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_002.Name = "Publisher Comments"

'Declaración de Nuevos Campos.

Dim Field_003 as New Field

Dim Field_004 as New Field

Dim Field_005 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_002 as New Index

'Caracteristicas de los Campos.

Field_003.Name = "PubID"

Field_003.Type = 4

Field_003.Attributes = 1

NewTd_002.Fields.Append Field_003

Field_004.Name = "Publisher"

Field_004.Type = 10

Field_004.Size = 25

Field_004.Attributes = 2

NewTd_002.Fields.Append Field_004

Field_005.Name = "Comments"

Field_005.Type = 12

Field_005.Attributes = 2

NewTd_002.Fields.Append Field_005

'Caracteristicas de los Index.

NewIdx_002.Name = "PrimaryKey"

NewIdx_002.Fields = "+PubID"

NewIdx_002.Unique = -1

NewIdx_002.Primary = -1

NewTd_002.Indexes.Append NewIdx_002

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_002

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_003 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_003.Name = "Publishers"

'Declaración de Nuevos Campos.

Dim Field_006 as New Field

Dim Field_007 as New Field

Dim Field_008 as New Field

Dim Field_009 as New Field

Dim Field_010 as New Field

Dim Field_011 as New Field

Dim Field_012 as New Field

Dim Field_013 as New Field

Dim Field_014 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_003 as New Index

'Caracteristicas de los Campos.

Field_006.Name = "PubID"

Field_006.Type = 4

Field_006.Attributes = 1

NewTd_003.Fields.Append Field_006

Field_007.Name = "Name"

Field_007.Type = 10

Field_007.Size = 50

Field_007.Attributes = 2

NewTd_003.Fields.Append Field_007

Field_008.Name = "Company Name"

Field_008.Type = 10

Field_008.Size = 255

Field_008.Attributes = 2

NewTd_003.Fields.Append Field_008

Field_009.Name = "Address"

Field_009.Type = 10

Field_009.Size = 50

Field_009.Attributes = 2

NewTd_003.Fields.Append Field_009

Field_010.Name = "City"

Field_010.Type = 10

Field_010.Size = 20

Field_010.Attributes = 2

NewTd_003.Fields.Append Field_010

Field_011.Name = "State"

Field_011.Type = 10

Field_011.Size = 10

Field_011.Attributes = 2

NewTd_003.Fields.Append Field_011

Field_012.Name = "Zip"

Field_012.Type = 10

Field_012.Size = 15

Field_012.Attributes = 2

NewTd_003.Fields.Append Field_012

Field_013.Name = "Telephone"

Field_013.Type = 10

Field_013.Size = 15

Field_013.Attributes = 2

NewTd_003.Fields.Append Field_013

Field_014.Name = "Fax"

Field_014.Type = 10

Field_014.Size = 15

Field_014.Attributes = 2

NewTd_003.Fields.Append Field_014

'Caracteristicas de los Index.

NewIdx_003.Name = "PrimaryKey"

NewIdx_003.Fields = "+PubID"

NewIdx_003.Unique = -1

NewIdx_003.Primary = -1

NewTd_003.Indexes.Append NewIdx_003

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_003

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_004 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_004.Name = "Titles"

'Declaración de Nuevos Campos.

Dim Field_015 as New Field

Dim Field_016 as New Field

Dim Field_017 as New Field

Dim Field_018 as New Field

Dim Field_019 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_004 as New Index

Dim NewIdx_005 as New Index

Dim NewIdx_006 as New Index

'Caracteristicas de los Campos.

Field_015.Name = "Title"

Field_015.Type = 10

Field_015.Size = 255

Field_015.Attributes = 2

NewTd_004.Fields.Append Field_015

Field_016.Name = "Year Published"

Field_016.Type = 3

Field_016.Attributes = 1

NewTd_004.Fields.Append Field_016

Field_017.Name = "Au_ID"

Field_017.Type = 4

Field_017.Attributes = 1

NewTd_004.Fields.Append Field_017

Field_018.Name = "ISBN"

Field_018.Type = 10

Field_018.Size = 20

Field_018.Attributes = 2

NewTd_004.Fields.Append Field_018

Field_019.Name = "PubID"

Field_019.Type = 4

Field_019.Attributes = 1

NewTd_004.Fields.Append Field_019

'Caracteristicas de los Index.

NewIdx_004.Name = "Au_ID"

NewIdx_004.Fields = "+Au_ID"

NewIdx_004.Unique = 0

NewIdx_004.Primary = 0

NewTd_004.Indexes.Append NewIdx_004

NewIdx_005.Name = "PrimaryKey"

NewIdx_005.Fields = "+ISBN"

NewIdx_005.Unique = -1

NewIdx_005.Primary = -1

NewTd_004.Indexes.Append NewIdx_005

NewIdx_006.Name = "PubID"

NewIdx_006.Fields = "+PubID"

NewIdx_006.Unique = 0

NewIdx_006.Primary = 0

NewTd_004.Indexes.Append NewIdx_006

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_004

'********************************************************************************

'Cierre de la Base de Datos.

MiBaseDeDatos.CLOSE

'Codigo Creado Automaticamente por DataBase Wizard.

'Basta con Abrir Cualquier Base Datos de Microsoft Access

'Para que DataBase Wizard pueda crear el Codigo.

'Probado Eficientemente en Visual Basic 3.0 Profesional

'Más Informes y Ventas Internet: ecova@vianet.com.mx

'100% Hecho en México.

'Ahora puede llamar al procedimiento de la Siguiente manera

'Sub Command1_Click ()

'CreaMiBaseDeDatos "C:\EUREKA.MDB"

'End Sub

'La base de datos se creará automaticamente

'PC Mayorista Internet: ecova@vianet.com.mx

End Sub


Ejemplo 2
'Ejemplo 2 Copie el codigo siguiente y peguelo en la seccion [Declarations] de Visual Basic...

Sub CreaMiBaseDeDatos (A$)'                  Regresar al Menú Principal (Return To Main Menu)

On Error Resume Next

'********************************************************************************

Dim MiBaseDeDatos As Database 'Declaración de la Base De Datos

Set MiBaseDeDatos = CreateDatabase(A$,";LANGID=0x0809;CP=1252;COUNTRY=0", 2)

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_001 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_001.Name = "Categorías"

'Declaración de Nuevos Campos.

Dim Field_001 as New Field

Dim Field_002 as New Field

Dim Field_003 as New Field

Dim Field_004 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_001 as New Index

Dim NewIdx_002 as New Index

'Caracteristicas de los Campos.

Field_001.Name = "ID de categoría"

Field_001.Type = 4

Field_001.Attributes = 17

NewTd_001.Fields.Append Field_001

Field_002.Name = "Nombre de categoría"

Field_002.Type = 10

Field_002.Size = 20

Field_002.Attributes = 2

NewTd_001.Fields.Append Field_002

Field_003.Name = "Descripción"

Field_003.Type = 12

Field_003.Attributes = 2

NewTd_001.Fields.Append Field_003

Field_004.Name = "Ilustración"

Field_004.Type = 11

Field_004.Attributes = 2

NewTd_001.Fields.Append Field_004

'Caracteristicas de los Index.

NewIdx_001.Name = "Nombre de categoría"

NewIdx_001.Fields = "+Nombre de categoría"

NewIdx_001.Unique = -1

NewIdx_001.Primary = 0

NewTd_001.Indexes.Append NewIdx_001

NewIdx_002.Name = "PrimaryKey"

NewIdx_002.Fields = "+ID de categoría"

NewIdx_002.Unique = -1

NewIdx_002.Primary = -1

NewTd_001.Indexes.Append NewIdx_002

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_001

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_002 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_002.Name = "Clientes"

'Declaración de Nuevos Campos.

Dim Field_005 as New Field

Dim Field_006 as New Field

Dim Field_007 as New Field

Dim Field_008 as New Field

Dim Field_009 as New Field

Dim Field_010 as New Field

Dim Field_011 as New Field

Dim Field_012 as New Field

Dim Field_013 as New Field

Dim Field_014 as New Field

Dim Field_015 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_003 as New Index

Dim NewIdx_004 as New Index

Dim NewIdx_005 as New Index

Dim NewIdx_006 as New Index

'Caracteristicas de los Campos.

Field_005.Name = "ID de cliente"

Field_005.Type = 10

Field_005.Size = 5

Field_005.Attributes = 2

NewTd_002.Fields.Append Field_005

Field_006.Name = "Nombre de compañía"

Field_006.Type = 10

Field_006.Size = 40

Field_006.Attributes = 2

NewTd_002.Fields.Append Field_006

Field_007.Name = "Nombre del contacto"

Field_007.Type = 10

Field_007.Size = 30

Field_007.Attributes = 2

NewTd_002.Fields.Append Field_007

Field_008.Name = "Cargo del contacto"

Field_008.Type = 10

Field_008.Size = 30

Field_008.Attributes = 2

NewTd_002.Fields.Append Field_008

Field_009.Name = "Dirección"

Field_009.Type = 10

Field_009.Size = 60

Field_009.Attributes = 2

NewTd_002.Fields.Append Field_009

Field_010.Name = "Ciudad"

Field_010.Type = 10

Field_010.Size = 15

Field_010.Attributes = 2

NewTd_002.Fields.Append Field_010

Field_011.Name = "Región"

Field_011.Type = 10

Field_011.Size = 15

Field_011.Attributes = 2

NewTd_002.Fields.Append Field_011

Field_012.Name = "Cód postal"

Field_012.Type = 10

Field_012.Size = 10

Field_012.Attributes = 2

NewTd_002.Fields.Append Field_012

Field_013.Name = "País"

Field_013.Type = 10

Field_013.Size = 15

Field_013.Attributes = 2

NewTd_002.Fields.Append Field_013

Field_014.Name = "Teléfono"

Field_014.Type = 10

Field_014.Size = 24

Field_014.Attributes = 2

NewTd_002.Fields.Append Field_014

Field_015.Name = "Fax"

Field_015.Type = 10

Field_015.Size = 24

Field_015.Attributes = 2

NewTd_002.Fields.Append Field_015

'Caracteristicas de los Index.

NewIdx_003.Name = "Ciudad"

NewIdx_003.Fields = "+Ciudad"

NewIdx_003.Unique = 0

NewIdx_003.Primary = 0

NewTd_002.Indexes.Append NewIdx_003

NewIdx_004.Name = "Nombre de compañía"

NewIdx_004.Fields = "+Nombre de compañía"

NewIdx_004.Unique = 0

NewIdx_004.Primary = 0

NewTd_002.Indexes.Append NewIdx_004

NewIdx_005.Name = "PrimaryKey"

NewIdx_005.Fields = "+ID de cliente"

NewIdx_005.Unique = -1

NewIdx_005.Primary = -1

NewTd_002.Indexes.Append NewIdx_005

NewIdx_006.Name = "Región"

NewIdx_006.Fields = "+Región"

NewIdx_006.Unique = 0

NewIdx_006.Primary = 0

NewTd_002.Indexes.Append NewIdx_006

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_002

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_003 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_003.Name = "Compañías de envíos"

'Declaración de Nuevos Campos.

Dim Field_016 as New Field

Dim Field_017 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_007 as New Index

'Caracteristicas de los Campos.

Field_016.Name = "ID de compañía envíos"

Field_016.Type = 4

Field_016.Attributes = 17

NewTd_003.Fields.Append Field_016

Field_017.Name = "Nombre de compañía"

Field_017.Type = 10

Field_017.Size = 40

Field_017.Attributes = 2

NewTd_003.Fields.Append Field_017

'Caracteristicas de los Index.

NewIdx_007.Name = "PrimaryKey"

NewIdx_007.Fields = "+ID de compañía envíos"

NewIdx_007.Unique = -1

NewIdx_007.Primary = -1

NewTd_003.Indexes.Append NewIdx_007

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_003

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_004 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_004.Name = "Detalles de pedidos"

'Declaración de Nuevos Campos.

Dim Field_018 as New Field

Dim Field_019 as New Field

Dim Field_020 as New Field

Dim Field_021 as New Field

Dim Field_022 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_008 as New Index

Dim NewIdx_009 as New Index

Dim NewIdx_010 as New Index

Dim NewIdx_011 as New Index

'Caracteristicas de los Campos.

Field_018.Name = "ID de pedido"

Field_018.Type = 4

Field_018.Attributes = 1

NewTd_004.Fields.Append Field_018

Field_019.Name = "ID de producto"

Field_019.Type = 4

Field_019.Attributes = 1

NewTd_004.Fields.Append Field_019

Field_020.Name = "Precio unidad"

Field_020.Type = 5

Field_020.Attributes = 1

NewTd_004.Fields.Append Field_020

Field_021.Name = "Cantidad"

Field_021.Type = 3

Field_021.Attributes = 1

NewTd_004.Fields.Append Field_021

Field_022.Name = "Descuento"

Field_022.Type = 6

Field_022.Attributes = 1

NewTd_004.Fields.Append Field_022

'Caracteristicas de los Index.

NewIdx_008.Name = "ID de producto"

NewIdx_008.Fields = "+ID de producto"

NewIdx_008.Unique = 0

NewIdx_008.Primary = 0

NewTd_004.Indexes.Append NewIdx_008

NewIdx_009.Name = "PrimaryKey"

NewIdx_009.Fields = "+ID de pedido;+ID de producto"

NewIdx_009.Unique = -1

NewIdx_009.Primary = -1

NewTd_004.Indexes.Append NewIdx_009

NewIdx_010.Name = "Reference2"

NewIdx_010.Fields = "+ID de producto"

NewIdx_010.Unique = -1

NewIdx_010.Primary = -1

NewTd_004.Indexes.Append NewIdx_010

NewIdx_011.Name = "Reference4"

NewIdx_011.Fields = "+ID de pedido"

NewIdx_011.Unique = -1

NewIdx_011.Primary = -1

NewTd_004.Indexes.Append NewIdx_011

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_004

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_005 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_005.Name = "Empleados"

'Declaración de Nuevos Campos.

Dim Field_023 as New Field

Dim Field_024 as New Field

Dim Field_025 as New Field

Dim Field_026 as New Field

Dim Field_027 as New Field

Dim Field_028 as New Field

Dim Field_029 as New Field

Dim Field_030 as New Field

Dim Field_031 as New Field

Dim Field_032 as New Field

Dim Field_033 as New Field

Dim Field_034 as New Field

Dim Field_035 as New Field

Dim Field_036 as New Field

Dim Field_037 as New Field

Dim Field_038 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_012 as New Index

Dim NewIdx_013 as New Index

'Caracteristicas de los Campos.

Field_023.Name = "ID de empleado"

Field_023.Type = 4

Field_023.Attributes = 17

NewTd_005.Fields.Append Field_023

Field_024.Name = "Apellidos"

Field_024.Type = 10

Field_024.Size = 20

Field_024.Attributes = 2

NewTd_005.Fields.Append Field_024

Field_025.Name = "Nombre"

Field_025.Type = 10

Field_025.Size = 10

Field_025.Attributes = 2

NewTd_005.Fields.Append Field_025

Field_026.Name = "Cargo"

Field_026.Type = 10

Field_026.Size = 30

Field_026.Attributes = 2

NewTd_005.Fields.Append Field_026

Field_027.Name = "Fecha de nacimiento"

Field_027.Type = 8

Field_027.Attributes = 1

NewTd_005.Fields.Append Field_027

Field_028.Name = "Fecha de contratación"

Field_028.Type = 8

Field_028.Attributes = 1

NewTd_005.Fields.Append Field_028

Field_029.Name = "Dirección"

Field_029.Type = 10

Field_029.Size = 60

Field_029.Attributes = 2

NewTd_005.Fields.Append Field_029

Field_030.Name = "Ciudad"

Field_030.Type = 10

Field_030.Size = 15

Field_030.Attributes = 2

NewTd_005.Fields.Append Field_030

Field_031.Name = "Región"

Field_031.Type = 10

Field_031.Size = 15

Field_031.Attributes = 2

NewTd_005.Fields.Append Field_031

Field_032.Name = "Cód postal"

Field_032.Type = 10

Field_032.Size = 10

Field_032.Attributes = 2

NewTd_005.Fields.Append Field_032

Field_033.Name = "País"

Field_033.Type = 10

Field_033.Size = 15

Field_033.Attributes = 2

NewTd_005.Fields.Append Field_033

Field_034.Name = "Tel domicilio"

Field_034.Type = 10

Field_034.Size = 24

Field_034.Attributes = 2

NewTd_005.Fields.Append Field_034

Field_035.Name = "Extensión tel"

Field_035.Type = 10

Field_035.Size = 4

Field_035.Attributes = 2

NewTd_005.Fields.Append Field_035

Field_036.Name = "Foto"

Field_036.Type = 11

Field_036.Attributes = 2

NewTd_005.Fields.Append Field_036

Field_037.Name = "Notas"

Field_037.Type = 12

Field_037.Attributes = 2

NewTd_005.Fields.Append Field_037

Field_038.Name = "Jefe"

Field_038.Type = 4

Field_038.Attributes = 1

NewTd_005.Fields.Append Field_038

'Caracteristicas de los Index.

NewIdx_012.Name = "Apellidos"

NewIdx_012.Fields = "+Apellidos"

NewIdx_012.Unique = 0

NewIdx_012.Primary = 0

NewTd_005.Indexes.Append NewIdx_012

NewIdx_013.Name = "PrimaryKey"

NewIdx_013.Fields = "+ID de empleado"

NewIdx_013.Unique = -1

NewIdx_013.Primary = -1

NewTd_005.Indexes.Append NewIdx_013

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_005

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_006 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_006.Name = "Pedidos"

'Declaración de Nuevos Campos.

Dim Field_039 as New Field

Dim Field_040 as New Field

Dim Field_041 as New Field

Dim Field_042 as New Field

Dim Field_043 as New Field

Dim Field_044 as New Field

Dim Field_045 as New Field

Dim Field_046 as New Field

Dim Field_047 as New Field

Dim Field_048 as New Field

Dim Field_049 as New Field

Dim Field_050 as New Field

Dim Field_051 as New Field

Dim Field_052 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_014 as New Index

Dim NewIdx_015 as New Index

Dim NewIdx_016 as New Index

Dim NewIdx_017 as New Index

Dim NewIdx_018 as New Index

Dim NewIdx_019 as New Index

Dim NewIdx_020 as New Index

'Caracteristicas de los Campos.

Field_039.Name = "ID de pedido"

Field_039.Type = 4

Field_039.Attributes = 1

NewTd_006.Fields.Append Field_039

Field_040.Name = "ID de cliente"

Field_040.Type = 10

Field_040.Size = 5

Field_040.Attributes = 2

NewTd_006.Fields.Append Field_040

Field_041.Name = "ID de empleado"

Field_041.Type = 4

Field_041.Attributes = 1

NewTd_006.Fields.Append Field_041

Field_042.Name = "Destinatario"

Field_042.Type = 10

Field_042.Size = 40

Field_042.Attributes = 2

NewTd_006.Fields.Append Field_042

Field_043.Name = "Dirección destinatario"

Field_043.Type = 10

Field_043.Size = 60

Field_043.Attributes = 2

NewTd_006.Fields.Append Field_043

Field_044.Name = "Ciudad destinatario"

Field_044.Type = 10

Field_044.Size = 15

Field_044.Attributes = 2

NewTd_006.Fields.Append Field_044

Field_045.Name = "Región destinatario"

Field_045.Type = 10

Field_045.Size = 15

Field_045.Attributes = 2

NewTd_006.Fields.Append Field_045

Field_046.Name = "Cód postal destinatario"

Field_046.Type = 10

Field_046.Size = 10

Field_046.Attributes = 2

NewTd_006.Fields.Append Field_046

Field_047.Name = "País destinatario"

Field_047.Type = 10

Field_047.Size = 15

Field_047.Attributes = 2

NewTd_006.Fields.Append Field_047

Field_048.Name = "Forma de envío"

Field_048.Type = 4

Field_048.Attributes = 1

NewTd_006.Fields.Append Field_048

Field_049.Name = "Fecha de pedido"

Field_049.Type = 8

Field_049.Attributes = 1

NewTd_006.Fields.Append Field_049

Field_050.Name = "Fecha de entrega"

Field_050.Type = 8

Field_050.Attributes = 1

NewTd_006.Fields.Append Field_050

Field_051.Name = "Fecha de envío"

Field_051.Type = 8

Field_051.Attributes = 1

NewTd_006.Fields.Append Field_051

Field_052.Name = "Gastos de envío"

Field_052.Type = 5

Field_052.Attributes = 1

NewTd_006.Fields.Append Field_052

'Caracteristicas de los Index.

NewIdx_014.Name = "Fecha de pedido"

NewIdx_014.Fields = "+Fecha de pedido"

NewIdx_014.Unique = 0

NewIdx_014.Primary = 0

NewTd_006.Indexes.Append NewIdx_014

NewIdx_015.Name = "ID de cliente"

NewIdx_015.Fields = "+ID de cliente"

NewIdx_015.Unique = 0

NewIdx_015.Primary = 0

NewTd_006.Indexes.Append NewIdx_015

NewIdx_016.Name = "ID de empleado"

NewIdx_016.Fields = "+ID de empleado"

NewIdx_016.Unique = 0

NewIdx_016.Primary = 0

NewTd_006.Indexes.Append NewIdx_016

NewIdx_017.Name = "PrimaryKey"

NewIdx_017.Fields = "+ID de pedido"

NewIdx_017.Unique = -1

NewIdx_017.Primary = -1

NewTd_006.Indexes.Append NewIdx_017

NewIdx_018.Name = "Reference"

NewIdx_018.Fields = "+ID de cliente"

NewIdx_018.Unique = -1

NewIdx_018.Primary = -1

NewTd_006.Indexes.Append NewIdx_018

NewIdx_019.Name = "Reference3"

NewIdx_019.Fields = "+Forma de envío"

NewIdx_019.Unique = -1

NewIdx_019.Primary = -1

NewTd_006.Indexes.Append NewIdx_019

NewIdx_020.Name = "Reference5"

NewIdx_020.Fields = "+ID de empleado"

NewIdx_020.Unique = -1

NewIdx_020.Primary = -1

NewTd_006.Indexes.Append NewIdx_020

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_006

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_007 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_007.Name = "Productos"

'Declaración de Nuevos Campos.

Dim Field_053 as New Field

Dim Field_054 as New Field

Dim Field_055 as New Field

Dim Field_056 as New Field

Dim Field_057 as New Field

Dim Field_058 as New Field

Dim Field_059 as New Field

Dim Field_060 as New Field

Dim Field_061 as New Field

Dim Field_062 as New Field

Dim Field_063 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_021 as New Index

Dim NewIdx_022 as New Index

Dim NewIdx_023 as New Index

Dim NewIdx_024 as New Index

Dim NewIdx_025 as New Index

Dim NewIdx_026 as New Index

'Caracteristicas de los Campos.

Field_053.Name = "ID de producto"

Field_053.Type = 4

Field_053.Attributes = 17

NewTd_007.Fields.Append Field_053

Field_054.Name = "ID de proveedor"

Field_054.Type = 4

Field_054.Attributes = 1

NewTd_007.Fields.Append Field_054

Field_055.Name = "ID de categoría"

Field_055.Type = 4

Field_055.Attributes = 1

NewTd_007.Fields.Append Field_055

Field_056.Name = "Nombre de producto"

Field_056.Type = 10

Field_056.Size = 40

Field_056.Attributes = 2

NewTd_007.Fields.Append Field_056

Field_057.Name = "Nombre en español"

Field_057.Type = 10

Field_057.Size = 40

Field_057.Attributes = 2

NewTd_007.Fields.Append Field_057

Field_058.Name = "Cantidad por unidad"

Field_058.Type = 10

Field_058.Size = 20

Field_058.Attributes = 2

NewTd_007.Fields.Append Field_058

Field_059.Name = "Precio unidad"

Field_059.Type = 5

Field_059.Attributes = 1

NewTd_007.Fields.Append Field_059

Field_060.Name = "Unidades en existencia"

Field_060.Type = 3

Field_060.Attributes = 1

NewTd_007.Fields.Append Field_060

Field_061.Name = "Unidades pedidas"

Field_061.Type = 3

Field_061.Attributes = 1

NewTd_007.Fields.Append Field_061

Field_062.Name = "Nivel de nuevo pedido"

Field_062.Type = 3

Field_062.Attributes = 1

NewTd_007.Fields.Append Field_062

Field_063.Name = "Suspendido"

Field_063.Type = 1

Field_063.Attributes = 1

NewTd_007.Fields.Append Field_063

'Caracteristicas de los Index.

NewIdx_021.Name = "ID de categoría"

NewIdx_021.Fields = "+ID de categoría"

NewIdx_021.Unique = 0

NewIdx_021.Primary = 0

NewTd_007.Indexes.Append NewIdx_021

NewIdx_022.Name = "ID de proveedor"

NewIdx_022.Fields = "+ID de proveedor"

NewIdx_022.Unique = 0

NewIdx_022.Primary = 0

NewTd_007.Indexes.Append NewIdx_022

NewIdx_023.Name = "Nombre de producto"

NewIdx_023.Fields = "+Nombre de producto"

NewIdx_023.Unique = 0

NewIdx_023.Primary = 0

NewTd_007.Indexes.Append NewIdx_023

NewIdx_024.Name = "PrimaryKey"

NewIdx_024.Fields = "+ID de producto"

NewIdx_024.Unique = -1

NewIdx_024.Primary = -1

NewTd_007.Indexes.Append NewIdx_024

NewIdx_025.Name = "Reference1"

NewIdx_025.Fields = "+ID de proveedor"

NewIdx_025.Unique = -1

NewIdx_025.Primary = -1

NewTd_007.Indexes.Append NewIdx_025

NewIdx_026.Name = "Reference1_Products"

NewIdx_026.Fields = "+ID de categoría"

NewIdx_026.Unique = -1

NewIdx_026.Primary = -1

NewTd_007.Indexes.Append NewIdx_026

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_007

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_008 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_008.Name = "Proveedores"

'Declaración de Nuevos Campos.

Dim Field_064 as New Field

Dim Field_065 as New Field

Dim Field_066 as New Field

Dim Field_067 as New Field

Dim Field_068 as New Field

Dim Field_069 as New Field

Dim Field_070 as New Field

Dim Field_071 as New Field

Dim Field_072 as New Field

Dim Field_073 as New Field

Dim Field_074 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_027 as New Index

Dim NewIdx_028 as New Index

'Caracteristicas de los Campos.

Field_064.Name = "ID de proveedor"

Field_064.Type = 4

Field_064.Attributes = 17

NewTd_008.Fields.Append Field_064

Field_065.Name = "Nombre de compañía"

Field_065.Type = 10

Field_065.Size = 40

Field_065.Attributes = 2

NewTd_008.Fields.Append Field_065

Field_066.Name = "Nombre del contacto"

Field_066.Type = 10

Field_066.Size = 30

Field_066.Attributes = 2

NewTd_008.Fields.Append Field_066

Field_067.Name = "Cargo del contacto"

Field_067.Type = 10

Field_067.Size = 30

Field_067.Attributes = 2

NewTd_008.Fields.Append Field_067

Field_068.Name = "Dirección"

Field_068.Type = 10

Field_068.Size = 60

Field_068.Attributes = 2

NewTd_008.Fields.Append Field_068

Field_069.Name = "Ciudad"

Field_069.Type = 10

Field_069.Size = 15

Field_069.Attributes = 2

NewTd_008.Fields.Append Field_069

Field_070.Name = "Región"

Field_070.Type = 10

Field_070.Size = 15

Field_070.Attributes = 2

NewTd_008.Fields.Append Field_070

Field_071.Name = "Cód postal"

Field_071.Type = 10

Field_071.Size = 10

Field_071.Attributes = 2

NewTd_008.Fields.Append Field_071

Field_072.Name = "País"

Field_072.Type = 10

Field_072.Size = 15

Field_072.Attributes = 2

NewTd_008.Fields.Append Field_072

Field_073.Name = "Teléfono"

Field_073.Type = 10

Field_073.Size = 24

Field_073.Attributes = 2

NewTd_008.Fields.Append Field_073

Field_074.Name = "Fax"

Field_074.Type = 10

Field_074.Size = 24

Field_074.Attributes = 2

NewTd_008.Fields.Append Field_074

'Caracteristicas de los Index.

NewIdx_027.Name = "Nombre de compañía"

NewIdx_027.Fields = "+Nombre de compañía"

NewIdx_027.Unique = 0

NewIdx_027.Primary = 0

NewTd_008.Indexes.Append NewIdx_027

NewIdx_028.Name = "PrimaryKey"

NewIdx_028.Fields = "+ID de proveedor"

NewIdx_028.Unique = -1

NewIdx_028.Primary = -1

NewTd_008.Indexes.Append NewIdx_028

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_008

'********************************************************************************

'Cierre de la Base de Datos.

MiBaseDeDatos.CLOSE

'Codigo Creado Automaticamente por DataBase Wizard.

'Basta con Abrir Cualquier Base Datos de Microsoft Access

'Para que DataBase Wizard pueda crear el Codigo.

'Probado Eficientemente en Visual Basic 3.0 Profesional

'Más Informes y Ventas Internet: ecova@vianet.com.mx

'100% Hecho en México.

'Ahora puede llamar al procedimiento de la Siguiente manera

'Sub Command1_Click ()

'CreaMiBaseDeDatos "C:\EUREKA.MDB"

'End Sub

'La base de datos se creará automaticamente

'PC Mayorista Internet: ecova@vianet.com.mx

End Sub


Ejemplo 3
'Ejemplo 3 Copie el codigo siguiente y peguelo en la seccion [Declarations] de Visual Basic...

Sub CreaMiBaseDeDatos (A$)'                  Regresar al Menú Principal (Return To Main Menu)

On Error Resume Next

'********************************************************************************

Dim MiBaseDeDatos As Database 'Declaración de la Base De Datos

Set MiBaseDeDatos = CreateDatabase(A$,";LANGID=0x0809;CP=1252;COUNTRY=0", 2)

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_001 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_001.Name = "Agenda"

'Declaración de Nuevos Campos.

Dim Field_001 as New Field

Dim Field_002 as New Field

Dim Field_003 as New Field

Dim Field_004 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_001 as New Index

'Caracteristicas de los Campos.

Field_001.Name = "Nombre"

Field_001.Type = 10

Field_001.Size = 255

Field_001.Attributes = 2

NewTd_001.Fields.Append Field_001

Field_002.Name = "Direccion"

Field_002.Type = 10

Field_002.Size = 255

Field_002.Attributes = 2

NewTd_001.Fields.Append Field_002

Field_003.Name = "telefono"

Field_003.Type = 10

Field_003.Size = 255

Field_003.Attributes = 2

NewTd_001.Fields.Append Field_003

Field_004.Name = "Comentarios"

Field_004.Type = 10

Field_004.Size = 255

Field_004.Attributes = 2

NewTd_001.Fields.Append Field_004

'Caracteristicas de los Index.

NewIdx_001.Name = "INDEX UNO"

NewIdx_001.Fields = "+Nombre"

NewIdx_001.Unique = -1

NewIdx_001.Primary = -1

NewTd_001.Indexes.Append NewIdx_001

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_001

'********************************************************************************

'Cierre de la Base de Datos.

MiBaseDeDatos.CLOSE

'Codigo Creado Automaticamente por DataBase Wizard.

'Basta con Abrir Cualquier Base Datos de Microsoft Access

'Para que DataBase Wizard pueda crear el Codigo.

'Probado Eficientemente en Visual Basic 3.0 Profesional

'Más Informes y Ventas Internet: ecova@vianet.com.mx

'100% Hecho en México.

'Ahora puede llamar al procedimiento de la Siguiente manera

'Sub Command1_Click ()

'CreaMiBaseDeDatos "C:\EUREKA.MDB"

'End Sub

'La base de datos se creará automaticamente

'PC Mayorista Internet: ecova@vianet.com.mx

End Sub


Ejemplo 4
'Ejemplo 4 Copie el codigo siguiente y peguelo en la seccion [Declarations] de Visual Basic...

Sub CreaMiBaseDeDatos (A$)'                  Regresar al Menú Principal (Return To Main Menu)

On Error Resume Next

'********************************************************************************

Dim MiBaseDeDatos As Database 'Declaración de la Base De Datos

Set MiBaseDeDatos = CreateDatabase(A$,";LANGID=0x0809;CP=1252;COUNTRY=0", 2)

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_001 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_001.Name = "001 LADA 91"

'Declaración de Nuevos Campos.

Dim Field_001 as New Field

Dim Field_002 as New Field

'Declaración de Nuevos Index.

'Caracteristicas de los Campos.

Field_001.Name = "Localidad"

Field_001.Type = 10

Field_001.Size = 255

Field_001.Attributes = 2

NewTd_001.Fields.Append Field_001

Field_002.Name = "Clave"

Field_002.Type = 10

Field_002.Size = 8

Field_002.Attributes = 1

NewTd_001.Fields.Append Field_002

'Caracteristicas de los Index.

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_001

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_002 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_002.Name = "002 LADA 95"

'Declaración de Nuevos Campos.

Dim Field_003 as New Field

Dim Field_004 as New Field

'Declaración de Nuevos Index.

'Caracteristicas de los Campos.

Field_003.Name = "Localidad"

Field_003.Type = 10

Field_003.Size = 255

Field_003.Attributes = 2

NewTd_002.Fields.Append Field_003

Field_004.Name = "Clave"

Field_004.Type = 10

Field_004.Size = 8

Field_004.Attributes = 1

NewTd_002.Fields.Append Field_004

'Caracteristicas de los Index.

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_002

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_003 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_003.Name = "003 LADA 98"

'Declaración de Nuevos Campos.

Dim Field_005 as New Field

Dim Field_006 as New Field

'Declaración de Nuevos Index.

'Caracteristicas de los Campos.

Field_005.Name = "Localidad"

Field_005.Type = 10

Field_005.Size = 255

Field_005.Attributes = 2

NewTd_003.Fields.Append Field_005

Field_006.Name = "Clave"

Field_006.Type = 10

Field_006.Size = 255

Field_006.Attributes = 2

NewTd_003.Fields.Append Field_006

'Caracteristicas de los Index.

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_003

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_004 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_004.Name = "004 LADA 800"

'Declaración de Nuevos Campos.

Dim Field_007 as New Field

Dim Field_008 as New Field

'Declaración de Nuevos Index.

'Caracteristicas de los Campos.

Field_007.Name = "Localidad"

Field_007.Type = 10

Field_007.Size = 255

Field_007.Attributes = 2

NewTd_004.Fields.Append Field_007

Field_008.Name = "Clave"

Field_008.Type = 10

Field_008.Size = 8

Field_008.Attributes = 1

NewTd_004.Fields.Append Field_008

'Caracteristicas de los Index.

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_004

'********************************************************************************

'Cierre de la Base de Datos.

MiBaseDeDatos.CLOSE

'Codigo Creado Automaticamente por DataBase Wizard.

'Basta con Abrir Cualquier Base Datos de Microsoft Access

'Para que DataBase Wizard pueda crear el Codigo.

'Probado Eficientemente en Visual Basic 3.0 Profesional

'Más Informes y Ventas Internet: ecova@vianet.com.mx

'100% Hecho en México.

'Ahora puede llamar al procedimiento de la Siguiente manera

'Sub Command1_Click ()

'CreaMiBaseDeDatos "C:\EUREKA.MDB"

'End Sub

'La base de datos se creará automaticamente

'PC Mayorista Internet: ecova@vianet.com.mx

End Sub


Ejemplo 5
'Ejemplo 5 Copie el codigo siguiente y peguelo en la seccion [Declarations] de Visual Basic...

Sub CreaMiBaseDeDatos (A$)'                  Regresar al Menú Principal (Return To Main Menu)

On Error Resume Next

'********************************************************************************

Dim MiBaseDeDatos As Database 'Declaración de la Base De Datos

Set MiBaseDeDatos = CreateDatabase(A$,";LANGID=0x0809;CP=1252;COUNTRY=0", 2)

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_001 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_001.Name = "Bombas"

'Declaración de Nuevos Campos.

Dim Field_001 as New Field

Dim Field_002 as New Field

Dim Field_003 as New Field

Dim Field_004 as New Field

Dim Field_005 as New Field

Dim Field_006 as New Field

Dim Field_007 as New Field

Dim Field_008 as New Field

Dim Field_009 as New Field

Dim Field_010 as New Field

'Declaración de Nuevos Index.

'Caracteristicas de los Campos.

Field_001.Name = "Fecha"

Field_001.Type = 8

Field_001.Attributes = 1

NewTd_001.Fields.Append Field_001

Field_002.Name = "Bomba Numero"

Field_002.Type = 7

Field_002.Attributes = 1

NewTd_001.Fields.Append Field_002

Field_003.Name = "Turno Numero"

Field_003.Type = 10

Field_003.Size = 255

Field_003.Attributes = 2

NewTd_001.Fields.Append Field_003

Field_004.Name = "Hora Inicio"

Field_004.Type = 10

Field_004.Size = 255

Field_004.Attributes = 2

NewTd_001.Fields.Append Field_004

Field_005.Name = "Hora Final"

Field_005.Type = 10

Field_005.Size = 255

Field_005.Attributes = 2

NewTd_001.Fields.Append Field_005

Field_006.Name = "Venta Magna Sin"

Field_006.Type = 5

Field_006.Attributes = 1

NewTd_001.Fields.Append Field_006

Field_007.Name = "Venta Nova"

Field_007.Type = 5

Field_007.Attributes = 1

NewTd_001.Fields.Append Field_007

Field_008.Name = "Venta Diesel"

Field_008.Type = 5

Field_008.Attributes = 1

NewTd_001.Fields.Append Field_008

Field_009.Name = "Venta Aceites"

Field_009.Type = 5

Field_009.Attributes = 1

NewTd_001.Fields.Append Field_009

Field_010.Name = "Venta Otros"

Field_010.Type = 5

Field_010.Attributes = 1

NewTd_001.Fields.Append Field_010

'Caracteristicas de los Index.

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_001

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_002 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_002.Name = "Clientes"

'Declaración de Nuevos Campos.

Dim Field_011 as New Field

Dim Field_012 as New Field

Dim Field_013 as New Field

Dim Field_014 as New Field

Dim Field_015 as New Field

Dim Field_016 as New Field

Dim Field_017 as New Field

Dim Field_018 as New Field

Dim Field_019 as New Field

Dim Field_020 as New Field

'Declaración de Nuevos Index.

'Caracteristicas de los Campos.

Field_011.Name = "Codigo Cliente"

Field_011.Type = 10

Field_011.Size = 255

Field_011.Attributes = 2

NewTd_002.Fields.Append Field_011

Field_012.Name = "Numero de Cliente"

Field_012.Type = 4

Field_012.Attributes = 17

NewTd_002.Fields.Append Field_012

Field_013.Name = "Nombre"

Field_013.Type = 10

Field_013.Size = 255

Field_013.Attributes = 2

NewTd_002.Fields.Append Field_013

Field_014.Name = "Apellido Paterno"

Field_014.Type = 10

Field_014.Size = 255

Field_014.Attributes = 2

NewTd_002.Fields.Append Field_014

Field_015.Name = "Apellido Materno"

Field_015.Type = 10

Field_015.Size = 255

Field_015.Attributes = 2

NewTd_002.Fields.Append Field_015

Field_016.Name = "Domicilio"

Field_016.Type = 10

Field_016.Size = 255

Field_016.Attributes = 2

NewTd_002.Fields.Append Field_016

Field_017.Name = "Telefono"

Field_017.Type = 10

Field_017.Size = 255

Field_017.Attributes = 2

NewTd_002.Fields.Append Field_017

Field_018.Name = "Codigo Postal"

Field_018.Type = 10

Field_018.Size = 255

Field_018.Attributes = 2

NewTd_002.Fields.Append Field_018

Field_019.Name = "Tipo Cliente"

Field_019.Type = 10

Field_019.Size = 255

Field_019.Attributes = 2

NewTd_002.Fields.Append Field_019

Field_020.Name = "Comentarios"

Field_020.Type = 10

Field_020.Size = 255

Field_020.Attributes = 2

NewTd_002.Fields.Append Field_020

'Caracteristicas de los Index.

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_002

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_003 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_003.Name = "Compras"

'Declaración de Nuevos Campos.

Dim Field_021 as New Field

Dim Field_022 as New Field

Dim Field_023 as New Field

Dim Field_024 as New Field

Dim Field_025 as New Field

Dim Field_026 as New Field

Dim Field_027 as New Field

Dim Field_028 as New Field

Dim Field_029 as New Field

Dim Field_030 as New Field

Dim Field_031 as New Field

'Declaración de Nuevos Index.

'Caracteristicas de los Campos.

Field_021.Name = "Fecha"

Field_021.Type = 8

Field_021.Attributes = 1

NewTd_003.Fields.Append Field_021

Field_022.Name = "Proveedor"

Field_022.Type = 10

Field_022.Size = 255

Field_022.Attributes = 2

NewTd_003.Fields.Append Field_022

Field_023.Name = "Domicilio"

Field_023.Type = 10

Field_023.Size = 255

Field_023.Attributes = 2

NewTd_003.Fields.Append Field_023

Field_024.Name = "Telefono"

Field_024.Type = 10

Field_024.Size = 255

Field_024.Attributes = 2

NewTd_003.Fields.Append Field_024

Field_025.Name = "Codigo Postal"

Field_025.Type = 10

Field_025.Size = 255

Field_025.Attributes = 2

NewTd_003.Fields.Append Field_025

Field_026.Name = "Concepto"

Field_026.Type = 10

Field_026.Size = 255

Field_026.Attributes = 2

NewTd_003.Fields.Append Field_026

Field_027.Name = "Cantidad"

Field_027.Type = 5

Field_027.Attributes = 1

NewTd_003.Fields.Append Field_027

Field_028.Name = "Forma de Pago"

Field_028.Type = 10

Field_028.Size = 255

Field_028.Attributes = 2

NewTd_003.Fields.Append Field_028

Field_029.Name = "Fecha de Pago"

Field_029.Type = 8

Field_029.Attributes = 1

NewTd_003.Fields.Append Field_029

Field_030.Name = "Pagado"

Field_030.Type = 1

Field_030.Attributes = 1

NewTd_003.Fields.Append Field_030

Field_031.Name = "Comentarios"

Field_031.Type = 10

Field_031.Size = 255

Field_031.Attributes = 2

NewTd_003.Fields.Append Field_031

'Caracteristicas de los Index.

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_003

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_004 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_004.Name = "Empleados"

'Declaración de Nuevos Campos.

Dim Field_032 as New Field

Dim Field_033 as New Field

Dim Field_034 as New Field

Dim Field_035 as New Field

Dim Field_036 as New Field

Dim Field_037 as New Field

Dim Field_038 as New Field

Dim Field_039 as New Field

Dim Field_040 as New Field

Dim Field_041 as New Field

Dim Field_042 as New Field

Dim Field_043 as New Field

Dim Field_044 as New Field

Dim Field_045 as New Field

Dim Field_046 as New Field

'Declaración de Nuevos Index.

'Caracteristicas de los Campos.

Field_032.Name = "Nombre"

Field_032.Type = 10

Field_032.Size = 255

Field_032.Attributes = 2

NewTd_004.Fields.Append Field_032

Field_033.Name = "Apellido Paterno"

Field_033.Type = 10

Field_033.Size = 255

Field_033.Attributes = 2

NewTd_004.Fields.Append Field_033

Field_034.Name = "Apellido Materno"

Field_034.Type = 10

Field_034.Size = 255

Field_034.Attributes = 2

NewTd_004.Fields.Append Field_034

Field_035.Name = "Fecha de Nacimiento"

Field_035.Type = 8

Field_035.Attributes = 1

NewTd_004.Fields.Append Field_035

Field_036.Name = "Lugar de Nacimiento"

Field_036.Type = 10

Field_036.Size = 255

Field_036.Attributes = 2

NewTd_004.Fields.Append Field_036

Field_037.Name = "Domicilio"

Field_037.Type = 10

Field_037.Size = 255

Field_037.Attributes = 2

NewTd_004.Fields.Append Field_037

Field_038.Name = "Telefono"

Field_038.Type = 10

Field_038.Size = 255

Field_038.Attributes = 2

NewTd_004.Fields.Append Field_038

Field_039.Name = "Entre Las Calles"

Field_039.Type = 10

Field_039.Size = 255

Field_039.Attributes = 2

NewTd_004.Fields.Append Field_039

Field_040.Name = "Colonia"

Field_040.Type = 10

Field_040.Size = 255

Field_040.Attributes = 2

NewTd_004.Fields.Append Field_040

Field_041.Name = "Codigo Postal"

Field_041.Type = 10

Field_041.Size = 255

Field_041.Attributes = 2

NewTd_004.Fields.Append Field_041

Field_042.Name = "Seguro Social"

Field_042.Type = 10

Field_042.Size = 255

Field_042.Attributes = 2

NewTd_004.Fields.Append Field_042

Field_043.Name = "Fecha de Alta"

Field_043.Type = 10

Field_043.Size = 255

Field_043.Attributes = 2

NewTd_004.Fields.Append Field_043

Field_044.Name = "Puesto Desempeñado"

Field_044.Type = 10

Field_044.Size = 255

Field_044.Attributes = 2

NewTd_004.Fields.Append Field_044

Field_045.Name = "Comentarios"

Field_045.Type = 10

Field_045.Size = 255

Field_045.Attributes = 2

NewTd_004.Fields.Append Field_045

Field_046.Name = "Fotografia"

Field_046.Type = 12

Field_046.Attributes = 2

NewTd_004.Fields.Append Field_046

'Caracteristicas de los Index.

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_004

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_005 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_005.Name = "Ventas"

'Declaración de Nuevos Campos.

Dim Field_047 as New Field

Dim Field_048 as New Field

Dim Field_049 as New Field

Dim Field_050 as New Field

Dim Field_051 as New Field

Dim Field_052 as New Field

Dim Field_053 as New Field

Dim Field_054 as New Field

Dim Field_055 as New Field

Dim Field_056 as New Field

Dim Field_057 as New Field

'Declaración de Nuevos Index.

'Caracteristicas de los Campos.

Field_047.Name = "Fecha"

Field_047.Type = 8

Field_047.Attributes = 1

NewTd_005.Fields.Append Field_047

Field_048.Name = "Nombre"

Field_048.Type = 10

Field_048.Size = 255

Field_048.Attributes = 2

NewTd_005.Fields.Append Field_048

Field_049.Name = "Direccion"

Field_049.Type = 10

Field_049.Size = 255

Field_049.Attributes = 2

NewTd_005.Fields.Append Field_049

Field_050.Name = "Telefono"

Field_050.Type = 10

Field_050.Size = 255

Field_050.Attributes = 2

NewTd_005.Fields.Append Field_050

Field_051.Name = "Codigo Postal"

Field_051.Type = 10

Field_051.Size = 255

Field_051.Attributes = 2

NewTd_005.Fields.Append Field_051

Field_052.Name = "Registro Federal de Contribuyentes"

Field_052.Type = 10

Field_052.Size = 255

Field_052.Attributes = 2

NewTd_005.Fields.Append Field_052

Field_053.Name = "Cantidad"

Field_053.Type = 7

Field_053.Attributes = 1

NewTd_005.Fields.Append Field_053

Field_054.Name = "Concepto"

Field_054.Type = 10

Field_054.Size = 255

Field_054.Attributes = 2

NewTd_005.Fields.Append Field_054

Field_055.Name = "Precio Unitario"

Field_055.Type = 5

Field_055.Attributes = 1

NewTd_005.Fields.Append Field_055

Field_056.Name = "Total"

Field_056.Type = 5

Field_056.Attributes = 1

NewTd_005.Fields.Append Field_056

Field_057.Name = "Forma de Pago"

Field_057.Type = 10

Field_057.Size = 255

Field_057.Attributes = 2

NewTd_005.Fields.Append Field_057

'Caracteristicas de los Index.

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_005

'********************************************************************************

'Codigo Creado Automaticamente por DataBase Wizard.

'Basta con Abrir Cualquier Base Datos de Microsoft Access

'Para que DataBase Wizard pueda crear el Codigo.

'Probado Eficientemente en Visual Basic 3.0 Profesional

'Más Informes y Ventas Internet: ecova@vianet.com.mx

'100% Hecho en México.

'Ahora puede llamar al procedimiento de la Siguiente manera

'Sub Command1_Click ()

'CreaMiBaseDeDatos "C:\EUREKA.MDB"

'End Sub

'La base de datos se creará automaticamente

'PC Mayorista Internet: ecova@vianet.com.mx

'Cierre de la Base de Datos.

MiBaseDeDatos.CLOSE

End Sub


Ejemplo 6
'Ejemplo 6 Copie el codigo siguiente y peguelo en la seccion [Declarations] de Visual Basic...

Sub CreaMiBaseDeDatos (A$)'                  Regresar al Menú Principal (Return To Main Menu)

On Error Resume Next

'********************************************************************************

Dim MiBaseDeDatos As Database 'Declaración de la Base De Datos

Set MiBaseDeDatos = CreateDatabase(A$,";LANGID=0x0809;CP=1252;COUNTRY=0", 2)

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_001 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_001.Name = "Alumno"

'Declaración de Nuevos Campos.

Dim Field_001 as New Field

Dim Field_002 as New Field

Dim Field_003 as New Field

Dim Field_004 as New Field

Dim Field_005 as New Field

Dim Field_006 as New Field

Dim Field_007 as New Field

Dim Field_008 as New Field

Dim Field_009 as New Field

Dim Field_010 as New Field

Dim Field_011 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_001 as New Index

'Caracteristicas de los Campos.

Field_001.Name = "Nombre"

Field_001.Type = 10

Field_001.Size = 255

Field_001.Attributes = 2

NewTd_001.Fields.Append Field_001

Field_002.Name = "Apellido Paterno"

Field_002.Type = 10

Field_002.Size = 255

Field_002.Attributes = 2

NewTd_001.Fields.Append Field_002

Field_003.Name = "Apellido Materno"

Field_003.Type = 10

Field_003.Size = 255

Field_003.Attributes = 2

NewTd_001.Fields.Append Field_003

Field_004.Name = "Grado"

Field_004.Type = 10

Field_004.Size = 255

Field_004.Attributes = 2

NewTd_001.Fields.Append Field_004

Field_005.Name = "Grupo"

Field_005.Type = 10

Field_005.Size = 255

Field_005.Attributes = 2

NewTd_001.Fields.Append Field_005

Field_006.Name = "Turno"

Field_006.Type = 10

Field_006.Size = 255

Field_006.Attributes = 2

NewTd_001.Fields.Append Field_006

Field_007.Name = "Domicilio"

Field_007.Type = 10

Field_007.Size = 255

Field_007.Attributes = 2

NewTd_001.Fields.Append Field_007

Field_008.Name = "Colonia"

Field_008.Type = 10

Field_008.Size = 255

Field_008.Attributes = 2

NewTd_001.Fields.Append Field_008

Field_009.Name = "Ciudad"

Field_009.Type = 10

Field_009.Size = 255

Field_009.Attributes = 2

NewTd_001.Fields.Append Field_009

Field_010.Name = "Telefono"

Field_010.Type = 10

Field_010.Size = 255

Field_010.Attributes = 2

NewTd_001.Fields.Append Field_010

Field_011.Name = "Ciclo Escolar"

Field_011.Type = 10

Field_011.Size = 255

Field_011.Attributes = 2

NewTd_001.Fields.Append Field_011

'Caracteristicas de los Index.

NewIdx_001.Name = "NOMBRES"

NewIdx_001.Fields = "+Nombre;+Apellido Paterno;+Apellido Materno"

NewIdx_001.Unique = -1

NewIdx_001.Primary = -1

NewTd_001.Indexes.Append NewIdx_001

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_001

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_002 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_002.Name = "Calificaciones"

'Declaración de Nuevos Campos.

Dim Field_012 as New Field

Dim Field_013 as New Field

Dim Field_014 as New Field

Dim Field_015 as New Field

Dim Field_016 as New Field

Dim Field_017 as New Field

Dim Field_018 as New Field

Dim Field_019 as New Field

Dim Field_020 as New Field

Dim Field_021 as New Field

Dim Field_022 as New Field

Dim Field_023 as New Field

'Declaración de Nuevos Index.

'Caracteristicas de los Campos.

Field_012.Name = "Periodo 01"

Field_012.Type = 6

Field_012.Attributes = 1

NewTd_002.Fields.Append Field_012

Field_013.Name = "Periodo 02"

Field_013.Type = 6

Field_013.Attributes = 1

NewTd_002.Fields.Append Field_013

Field_014.Name = "Periodo 03"

Field_014.Type = 6

Field_014.Attributes = 1

NewTd_002.Fields.Append Field_014

Field_015.Name = "Periodo 04"

Field_015.Type = 6

Field_015.Attributes = 1

NewTd_002.Fields.Append Field_015

Field_016.Name = "Periodo 05"

Field_016.Type = 6

Field_016.Attributes = 1

NewTd_002.Fields.Append Field_016

Field_017.Name = "Periodo 06"

Field_017.Type = 6

Field_017.Attributes = 1

NewTd_002.Fields.Append Field_017

Field_018.Name = "Periodo 07"

Field_018.Type = 6

Field_018.Attributes = 1

NewTd_002.Fields.Append Field_018

Field_019.Name = "Periodo 08"

Field_019.Type = 6

Field_019.Attributes = 1

NewTd_002.Fields.Append Field_019

Field_020.Name = "Periodo 09"

Field_020.Type = 6

Field_020.Attributes = 1

NewTd_002.Fields.Append Field_020

Field_021.Name = "Periodo 10"

Field_021.Type = 6

Field_021.Attributes = 1

NewTd_002.Fields.Append Field_021

Field_022.Name = "Periodo 11"

Field_022.Type = 6

Field_022.Attributes = 1

NewTd_002.Fields.Append Field_022

Field_023.Name = "Periodo 12"

Field_023.Type = 6

Field_023.Attributes = 1

NewTd_002.Fields.Append Field_023

'Caracteristicas de los Index.

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_002

'********************************************************************************

'Declaración de una Nueva Tabla.

Dim NewTd_003 as New TableDef

'Declaración Del Nombre de la Tabla.

NewTd_003.Name = "Materias"

'Declaración de Nuevos Campos.

Dim Field_024 as New Field

Dim Field_025 as New Field

Dim Field_026 as New Field

Dim Field_027 as New Field

Dim Field_028 as New Field

Dim Field_029 as New Field

Dim Field_030 as New Field

Dim Field_031 as New Field

Dim Field_032 as New Field

Dim Field_033 as New Field

Dim Field_034 as New Field

Dim Field_035 as New Field

'Declaración de Nuevos Index.

Dim NewIdx_002 as New Index

'Caracteristicas de los Campos.

Field_024.Name = "Periodo"

Field_024.Type = 6

Field_024.Attributes = 1

NewTd_003.Fields.Append Field_024

Field_025.Name = "Español"

Field_025.Type = 10

Field_025.Size = 255

Field_025.Attributes = 2

NewTd_003.Fields.Append Field_025

Field_026.Name = "Matematicas"

Field_026.Type = 10

Field_026.Size = 255

Field_026.Attributes = 2

NewTd_003.Fields.Append Field_026

Field_027.Name = "Ciencias Naturales"

Field_027.Type = 10

Field_027.Size = 255

Field_027.Attributes = 2

NewTd_003.Fields.Append Field_027

Field_028.Name = "Ciencias Sociales"

Field_028.Type = 10

Field_028.Size = 255

Field_028.Attributes = 2

NewTd_003.Fields.Append Field_028

Field_029.Name = "Quimica"

Field_029.Type = 10

Field_029.Size = 255

Field_029.Attributes = 2

NewTd_003.Fields.Append Field_029

Field_030.Name = "Fisica"

Field_030.Type = 10

Field_030.Size = 255

Field_030.Attributes = 2

NewTd_003.Fields.Append Field_030

Field_031.Name = "Biologia"

Field_031.Type = 10

Field_031.Size = 255

Field_031.Attributes = 2

NewTd_003.Fields.Append Field_031

Field_032.Name = "Ingles"

Field_032.Type = 10

Field_032.Size = 255

Field_032.Attributes = 2

NewTd_003.Fields.Append Field_032

Field_033.Name = "Computacion"

Field_033.Type = 10

Field_033.Size = 255

Field_033.Attributes = 2

NewTd_003.Fields.Append Field_033

Field_034.Name = "Artisticas"

Field_034.Type = 10

Field_034.Size = 255

Field_034.Attributes = 2

NewTd_003.Fields.Append Field_034

Field_035.Name = "Educacion Fisica"

Field_035.Type = 10

Field_035.Size = 255

Field_035.Attributes = 2

NewTd_003.Fields.Append Field_035

'Caracteristicas de los Index.

NewIdx_002.Name = "SortIndex"

NewIdx_002.Fields = "+Periodo"

NewIdx_002.Unique = -1

NewIdx_002.Primary = -1

NewTd_003.Indexes.Append NewIdx_002

'Creación de la Tabla.

MiBaseDeDatos.TableDefs.Append NewTd_003

'********************************************************************************

'Codigo Creado Automaticamente por DataBase Wizard.

'Basta con Abrir Cualquier Base Datos de Microsoft Access

'Para que DataBase Wizard pueda crear el Codigo.

'Probado Eficientemente en Visual Basic 3.0 Profesional

'Más Informes y Ventas Internet: ecova@vianet.com.mx

'100% Hecho en México.

'Ahora puede llamar al procedimiento de la Siguiente manera

'Sub Command1_Click ()

'CreaMiBaseDeDatos "C:\EUREKA.MDB"

'End Sub

'La base de datos se creará automaticamente

'PC Mayorista Internet: ecova@vianet.com.mx

'Cierre de la Base de Datos.

MiBaseDeDatos.CLOSE

End Sub